# /mnt/d/whj_dev/announcements/config.py

# --- Proxy Configuration ---
PROXY_API_URL = "http://v2.api.juliangip.com/unlimited/getips?auto_white=1&num=1&pt=1&result_type=json&trade_no=5964580058336129&sign=546f29ff6cf4fe25b70ab1da019bd246"
MAX_DOWNLOAD_WORKERS = 10  # 下载PDF的最大并发数
MAX_LLM_WORKERS = 3  # 大模型请求的最大并发数
MAX_RETRIES = 3  # 失败重试次数

# --- SiliconFlow API Configuration ---
# 重要：请将下面的API密钥替换为您的真实有效密钥！
SILICONFLOW_API_KEY = "sk-yhitgzzpbzmprbojjcrsrhsiklnnybqfqyahjsymxtwxqlrz"  # <--- 修改这里
SILICONFLOW_API_URL = "https://api.siliconflow.cn/v1/chat/completions"
# 请根据SiliconFlow平台确认准确的模型名称，例如 "Qwen/Qwen-32B-Chat" 或用户提供的 "Qwen/QwQ-32B"
# AI_MODEL_NAME = "Pro/deepseek-ai/DeepSeek-V3" # <--- 如果需要，修改这里
AI_MODEL_NAME = "Qwen/Qwen3-30B-A3B"

# --- OpenRouter API Configuration ---
OPENROUTER_API_KEY = "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"  # <--- 修改这里
OPENROUTER_API_URL = "https://openrouter.ai/api/v1/chat/completions"
OPENROUTER_MODEL_NAME = "qwen/qwen3-30b-a3b:free"
OPENROUTER_SITE_URL = "https://announcements-analyzer.local"  # 可选，用于OpenRouter排名
OPENROUTER_SITE_NAME = "公告分析系统"  # 可选，用于OpenRouter排名

# --- LLM Provider Selection ---
# 可选值: "siliconflow", "openrouter", "auto"
# "auto" 模式会在一个API失败时自动切换到另一个
LLM_PROVIDER = "auto"

# --- Database Configuration ---
DATABASE_PATH = "announcements.db"  # 数据库文件路径

# --- PDF Download Configuration ---
DOWNLOAD_DIR = "downloads"  # PDF文件下载目录
PDF_BASE_URL = "https://www.bseinfo.net" # 下载PDF的基础URL

# --- Processing Configuration ---
# LLM输入内容的最大字符数，超过则分块
MAX_CHARS_PER_LLM_REQUEST = 10000
# 分块总结时，每块内容后附加的指示
CHUNK_SUMMARY_PROMPT_SUFFIX = "\n\n请总结以上内容的核心要点。"
# 两次API调用之间的延时（秒），避免过于频繁
API_CALL_DELAY_SECONDS = 5  # 每次调用LLM API前的延时秒数，用于速率控制
# API调用超时时间（秒）
API_TIMEOUT = 30  # API调用超时时间

# --- Logging Configuration ---
LOG_LEVEL = "INFO" # 可选: DEBUG, INFO, WARNING, ERROR, CRITICAL
